package com.kede.app.domain;

import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @description /
* @author Pr.li
* @date 2023-10-14
**/
@Entity
@Data
@Table(name="t_transport")
public class Transport implements Serializable {
    /**
    * 
    */
    @ApiModelProperty(value = "id")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    private Integer id;
    /**
    * 联系人电话
    */
    @ApiModelProperty(value = "联系人电话")
    @Column(name = "`phone`")
    private String phone;
    /**
    * 联系人
    */
    @ApiModelProperty(value = "联系人")
    @Column(name = "`people`")
    private String people;
    /**
    * 始发地
    */
    @ApiModelProperty(value = "始发地")
    @Column(name = "`start_location`")
    private String startLocation;
    /**
    * 目的地
    */
    @ApiModelProperty(value = "目的地")
    @Column(name = "`end_location`")
    private String endLocation;
    /**
    * 当前位置
    */
    @ApiModelProperty(value = "当前位置")
    @Column(name = "`cur_location`")
    private String curLocation;
    /**
    * 车牌号
    */
    @ApiModelProperty(value = "车牌号")
    @Column(name = "`car_no`")
    private String carNo;
    /**
    * 发车时间
    */
    @ApiModelProperty(value = "发车时间")
    @Column(name = "`start_time`")
    private Timestamp startTime;
    /**
    * 创建时间
    */
    @ApiModelProperty(value = "创建时间")
    @Column(name = "`create_time`")
    private Timestamp createTime;
    /**
    * 众多包裹编号,分割
    */
    @ApiModelProperty(value = "众多包裹编号,分割")
    @Column(name = "`packages`")
    private String packages;
    /**
    * 司机的openid
    */
    @ApiModelProperty(value = "司机的openid")
    @Column(name = "`openid`")
    private String openid;
    /**
    * 备注信息
    */
    @ApiModelProperty(value = "备注信息")
    @Column(name = "`remark`")
    private String remark;
    /**
    * 1 正常 2运输中 3已结算
    */
    @ApiModelProperty(value = "1 正常 2运输中 3已结算")
    @Column(name = "`status`")
    private Integer status;

    public void copy(Transport source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
